package com.luckylo.activemq.service;

import com.luckylo.activemq.bean.Message;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * @user: luckylo
 * @date: 2018-1-17
 */
@Component
public class MessReceiver {

    private static final Logger LOG = LoggerFactory.getLogger(MessReceiver.class);

    @JmsListener(destination = "aggregate")
    public void startAggregate(Message message) {
        LOG.info("从 aggregate 收到消息  {}", message);
    }

    @JmsListener(destination = "exportExcel")
    public void exportExcel(Message message) {
        LOG.info("从 exportExcel 收到消息 {}", message);
    }

    @JmsListener(destination = "exportScoreInfo")
    public void exportScoreInfo(Message message) {
        LOG.info("从 exportScoreInfo 收到消息 {}", message);
    }

    @JmsListener(destination = "exportAggregateResult")
    public void exportAggregateResult(Message message) {
        LOG.info("从 exportAggregateResult 收到消息 {}", message);
    }

}
